from likeshop_api_project.base.shopbase import Tools


class reg_model(Tools):
    # 定义路径
    path = 'api/account/register'

    # 发送注册请求
    def reg_action(self, tel, pwd, client='4'):
        mydata = {
            'mobile': tel,
            'password': pwd,
            'client': client,
        }
        res = self.huihua.post(url=self.hosturl + self.path, data=mydata)
        return res.json()


if __name__ == '__main__':
    import requests

    huihua = requests.session()
    reg = reg_model(huihua=huihua)
    msg = reg.reg_action(tel='18100001234', pwd='haha123', client='4')
    print(msg)
